<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="demo.js"></script>
    <script>
        /* 
          load: 当文档内容完全加载完成会触发该事件（包括图像，脚本文件，css文件等）
          DOMContentLoaded：不包含 CSS 样式和图片 
        
        */
    //    window.addEventListener('load',function(){
       window.addEventListener('DOMContentLoaded',function(){
           let bth=document.querySelector('button');
           bth.addEventListener('click',function(){
               console.log(this);
           })
       })
    </script>
    <button>陈奕迅</button>
</body>
</html>